package com.cz.run.beans.mysql;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 收货地址表
 * </p>
 *
 * @author CAIYJ
 * @since 2018-05-23
 */
@TableName("delivery_address")
public class DeliveryAddress extends Model<DeliveryAddress> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("user_id")
    private Integer userId;
    /**
     * 联系电话
     */
    private String phone;
    /**
     * 收货人
     */
    private String name;
    /**
     * 所在地区
     */
    @TableField("address_location")
    private String addressLocation;
    /**
     * 省
     */
    @TableField("address_province")
    private String addressProvince;
    /**
     * 市
     */
    @TableField("address_city")
    private String addressCity;
    /**
     * 区
     */
    @TableField("address_district")
    private String addressDistrict;
    /**
     * 详细地址
     */
    private String address;
    /**
     * 1：默认；0：非默认
     */
    @TableField("is_default")
    private Integer isDefault;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddressLocation() {
        return addressLocation;
    }

    public void setAddressLocation(String addressLocation) {
        this.addressLocation = addressLocation;
    }

    public String getAddressProvince() {
        return addressProvince;
    }

    public void setAddressProvince(String addressProvince) {
        this.addressProvince = addressProvince;
    }

    public String getAddressCity() {
        return addressCity;
    }

    public void setAddressCity(String addressCity) {
        this.addressCity = addressCity;
    }

    public String getAddressDistrict() {
        return addressDistrict;
    }

    public void setAddressDistrict(String addressDistrict) {
        this.addressDistrict = addressDistrict;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "DeliveryAddress{" +
        ", id=" + id +
        ", userId=" + userId +
        ", phone=" + phone +
        ", name=" + name +
        ", addressLocation=" + addressLocation +
        ", addressProvince=" + addressProvince +
        ", addressCity=" + addressCity +
        ", addressDistrict=" + addressDistrict +
        ", address=" + address +
        ", isDefault=" + isDefault +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
